﻿
namespace AudioBookWS.AudioManagement.Util
{
    public class CoreConstants
    {
        public class Common
        {
            /// <summary>
            /// The extension of images
            /// </summary>
            public const string IMAGE_EXTENSION = ".jpg";

            /// <summary>
            /// 
            /// The extension of audio file</summary>
            public const string AUDIO_EXTENSION = ".mp3";

            public const string VIDEO_EXTENSION = ".3gp";

            /// <summary>
            /// The folder containts audio files
            /// </summary>
            public const string AUDIO_FOLDER = "Audio\\";

            public const string VIDEO_FOLDER = "Video\\";

            /// <summary>
            /// The folder containts category images
            /// </summary>
            public const string CATEGORY_FOLDER = "Category\\";

            /// <summary>
            /// The folder containts advertisement images
            /// </summary>
            public const string ADVERTISEMENT_FOLDER = "Advertisement\\";

            /// <summary>
            /// Original extension ex. 12345_org.mp3
            /// </summary>
            public const string ORIGINAL_FILE = "_org";

            /// <summary>
            /// Original bitrate
            /// </summary>
            public const int ORIGINAL_BITRATE = 64;

            /// <summary>
            /// param 0: ModuleID, param 2: ItemID, param 3: ItemType
            /// </summary>
            public const string DOWNLOAD_PARAM = "m:{0}-id:{1}-t:{2}";
        }

        public class ConfigKey
        {
            /// <summary>
            /// The key containts path of data folder
            /// </summary>
            public const string DATA_FOLDER = "DATA_FOLDER";

            public const string TEMP_FOLDER = "TEMP_FOLDER";
            /// <summary>
            /// ServerID configuration key
            /// </summary>
            public const string SERVER_ID = "SERVER_ID";

            /// <summary>
            /// The key of mp3 cutter
            /// </summary>
            public const string MP3_CUTTER = "Mp3Cutter";
        }

        /// <summary>
        /// The status of physical file of the server
        /// </summary>
        public enum FileStatus
        {
            /// <summary>
            /// The physical file is being added
            /// </summary>
            Adding = 1,

            /// <summary>
            /// The physical file is being deleted
            /// </summary>
            Deleting = 2,

            /// <summary>
            /// The physical file was added
            /// </summary>
            Added = 3
        }

        /// <summary>
        /// The advertisiment type
        /// </summary>
        public enum ItemType
        {
            /// <summary>
            /// 1
            /// </summary>
            Category = 1,

            /// <summary>
            /// 2
            /// </summary>
            Article = 2,

            /// <summary>
            /// 3
            /// </summary>
            ArticlePart = 3,

            /// <summary>
            /// 4
            /// </summary>
            AdvText = 4,

            /// <summary>
            /// 5
            /// </summary>
            /// 
            AdvImage = 5,

            /// <summary>
            /// 6
            /// </summary>
            NormalMessage = 6,

            /// <summary>
            /// 7
            /// </summary>
            NotifyMessage = 7
        }
    }
}
